import React from 'react'

const BackRoom = (props) => {
  let majiangStyle = props.orientation === 'portrait' ? {
    position: 'absolute',
    left: '13%',
    bottom: '4%',
    width: '31%',
    height: '7%',
    zIndex: '99',
  } : {
    position: 'absolute',
    left: '25%',
    bottom: '4%',
    width: '26%',
    height: '7%',
    zIndex: '99',
  }
  // 返回群聊
  if (props.mode === 'open_jh') {
    majiangStyle = {
      position: 'absolute',
      left: '8%',
      bottom: '4%',
      width: '26%',
      height: '7%',
      zIndex: '99',
    }
  }
  var backRoomStyle = {}
  switch (props.gameInfo.name) {
    case '红中麻将':
      backRoomStyle = majiangStyle
      break
    case '长沙麻将':
      backRoomStyle = majiangStyle
      break
    case '惠州麻将':
      backRoomStyle = majiangStyle
      break
    case '平江扎鸟':
      backRoomStyle = majiangStyle
      break
    case '跑得快':
      backRoomStyle = majiangStyle
      break
    case '新跑得快':
      backRoomStyle = majiangStyle
      break
    case '欢乐三张':
      backRoomStyle = majiangStyle
      break
    case '经典斗牛':
      backRoomStyle = majiangStyle
      break
    case '斗公牛':
      backRoomStyle = majiangStyle
      break
    case '点子牛':
      backRoomStyle = majiangStyle
      break
    case '三公':
      backRoomStyle = majiangStyle
      break
    case '平江开船':
      backRoomStyle = majiangStyle
      break
    default:
      backRoomStyle = majiangStyle
  }
  return <div style={backRoomStyle} onClick={props.backroom}>
  </div>
}

export default BackRoom